<template>
  <div id="app">
    <div id="nav">
      <!-- 在这里进行展示  mydemo 和下面取的名字保持一致 -->
      <!-- <mydemo></mydemo> -->
      <myhead></myhead>
      <myNav></myNav>
      <hr />
      <!-- 路由出口 -->
      <router-view></router-view>

      <div class="rlinkbox">
        <router-link :to="{ name: 'home' }">首页</router-link>
        <router-link :to="{ name: 'list' }">列表</router-link>
        <router-link :to="{ name: 'mine' }">个人中心</router-link>
        <router-link :to="{name:'vuex'}">Vuex</router-link>
      </div>
    </div>
  </div>
</template>

<script>
import demo from "@/components/demo.vue"; // 引入demo 组件模板
export default {
  components: {
    // 进行 demo 的局部组件注册
    mydemo: demo, // 把demo 声明给mydemo  mydemo可以随便取名(abc,sb 都行)
  },
};
</script>

<style lang="scss">
#app {
  font-family: Avenir, Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-align: center;
  color: #2c3e50;
}

#nav {
  padding: 30px;

  a {
    font-weight: bold;
    color: #2c3e50;

    &.router-link-exact-active {
      color: #42b983;
    }
  }
}

.rlinkbox {
  display: flex;
  justify-content: space-around;
}


</style>
